﻿<Window x:Class="WPF.RealTime.Shell.MainWindow"
        WindowStyle="ThreeDBorderWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:AttachedProperty="clr-namespace:WPF.RealTime.Infrastructure.AttachedProperty;assembly=WPF.RealTime.Infrastructure" xmlns:AttachedCommand="clr-namespace:WPF.RealTime.Infrastructure.AttachedCommand;assembly=WPF.RealTime.Infrastructure" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" Title="MainWindow" 
        AttachedProperty:WindowProperties.Left="1"
        AttachedProperty:WindowProperties.Top="{x:Static AttachedProperty:WindowProperties.OneHalfHeight}"
        AttachedProperty:WindowProperties.Height="{x:Static AttachedProperty:WindowProperties.OneHalfHeight}"
        AttachedProperty:WindowProperties.Width="{x:Static AttachedProperty:WindowProperties.TotalWidth}">
    <StackPanel Orientation="Vertical">
        <GroupBox Header="This is Ribbon area" MaxHeight="200"  VerticalAlignment="Top">
            <TabControl Name="RibbonRegion">
               
            </TabControl>
        </GroupBox>
        <GroupBox Header="This is App Settings area"   VerticalAlignment="Top">
        <StackPanel Margin="5,5,5,5" Orientation="Horizontal">
        <TextBlock VerticalAlignment="Center" Text="Current Theme: " Width="80"></TextBlock>
        <ComboBox SelectedIndex="0" ItemsSource="{Binding Themes}" Width="80" VerticalAlignment="Center" >
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="SelectionChanged">
                            <AttachedCommand:EventToCommandTrigger 
                                Command="{Binding ChangeThemeCommand}" 
                                />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </ComboBox>
        </StackPanel>
        </GroupBox>
        
        <Expander>
            <Expander.Header>
                <StackPanel Orientation="Horizontal">
                    <TextBlock VerticalAlignment="Center" Text="Loaded Modules and Services. "></TextBlock>
                    <TextBlock VerticalAlignment="Center" Visibility="{Binding HeartbeatLost}" Text="Lost a Heartbeat from: "></TextBlock>
                    <TextBlock VerticalAlignment="Center" FontWeight="Bold" Visibility="{Binding HeartbeatLost}" Text="{Binding StaleModule}"></TextBlock>
                    <Button Margin="2,2,2,2" VerticalAlignment="Center" Visibility="{Binding HeartbeatLost}" Content="Unload" Command="{Binding ReloadCommand}"></Button>
                </StackPanel>
            </Expander.Header>
            <ListBox SelectionMode="Extended" ItemsSource="{Binding Heartbeats}">
            </ListBox>
        </Expander>
        
    </StackPanel>
</Window>
